<template>
  <div id="app">
    <HeaderVue></HeaderVue>

    <!-- 路由组件出口 -->
    <router-view></router-view>

    <!-- Home,Search显示，其他隐藏 -->
    <!-- 方案一 -->
    <!-- <FooterVue v-show="$route.path == '/home' || $route.path =='/search'"></FooterVue> -->
  
    <!-- 方案二通过路由中meta属性参数判断 -->
    <FooterVue v-show="$route.meta.isFooter"></FooterVue>
  
  
  
  </div>
</template>

<script>
import HeaderVue from './components/Header/index.vue'
import FooterVue from './components/Footer/index.vue'

export default {
  name: 'App',
  components: {
    HeaderVue,
    FooterVue
  },
  mounted() {
    // 派发
    this.$store.dispatch("categroyList");
  },
}
</script>

<style>

</style>
